package com.liyunlong.demoliyunlong.shangji;

public class VoltageConversionExample {
    public static void main(String[] args) {
        ForeignV fV = new ForeignV(110);
        get220Voltage adapter = new VoltageAdapter(fV);
        int voltage = adapter.get220V();
        System.out.println("输入的国外电压为: " + fV.getForeignVoltage() + "V");
        System.out.println("通过转接头转换后，得到国内电压: " + voltage + "V");

        voltage = adapter.get220V();
        System.out.println("验证适配后的电压"+voltage + "V");
    }
}